﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
using Freeform;

namespace Space_in_Shaders
{
    public class Flame : Fader
    {
        public NMotion NMot { get; set; }

        public Flame(SpaceWorld World, Vector2 Position, Vector2 Velocity, Single Variance)
            : base(World, 800)
        {
            Game.LoadAnimation(this);
            Actor.Depth = 0.79f;
            StartColour = new Color(new Vector4(0.26f, 0.58f, 0.98f, 1));

            SpatialProperties.Size = new Vector2(Game.Random.Single(0.4f, 2f), Game.Random.Single(0.4f, 2f));
            SpatialProperties.Position = Position + new Vector2(Game.Random.Single(-Variance, Variance), Game.Random.Single(-Variance, Variance));

            NMot = new NMotion(SpatialProperties);
            NMot.ForceResistance = 0.99f;
            NMot.Velocity = Velocity;
            NMot.Spin = Game.Random.Single(-25, 25);
        }

        public override void Update(GameTime time)
        {
            base.Update(time);
        }
    }
}
